Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use env variables instead of hardcoded paths for ms-mpi search #327

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

maksim-petukhov
Copy link
Contributor

Proposed changes

Microsoft MPI Redist and SDK installers set environment variables (MSMPI_BIN, MSMPI_INC, MSMPI_LIB32, MSMPI_LIB64) that described in the example in Microsoft MPI repository. These environment variables are widely used. For example, CMake uses them in it's FindMPI module there and there, Meson also uses these variables to locate MS-MPI.

This PR changes the way MS-MPI is searched. Instead of hardcoded paths to MS-MPI Redist and SDK, paths from environment variables mentioned above are used. This allows to use MS-MPI Redist and SDK installed to custom path.

I tested these changes with the latest MS-MPI Redist and SDK installed to the default path and to custom path.

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes
  • Other (please describe):

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I searched the discussions
  • I searched the closed and open issues
  • I read the contribution guidelines
  • I added myself to the copyright attributions for significant changes
  • I checked that tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • I added necessary documentation (if appropriate)

@maksim-petukhov
Copy link
Contributor Author

@grafikrobot could you please review this PR?

@grafikrobot grafikrobot merged commit 2bd9edf into bfgroup:main Sep 3, 2023
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants